<?php
namespace App\Http\Middleware;

use Closure;
use Session;

class AdminMiddle
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  \Closure $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
       //  print_r(Session::get('admin'));exit;
        //登陆判断
        if (!Session::has('admin')) {
            return redirect(env('DOMAIN') . '/mcadmin/login');
        }
        return $next($request);
    }
}